import Vue from 'vue'
import 'element-ui/lib/theme-chalk/index.css';
import {successMessage, errorMessage} from "./message"
import filter from "./filter"
import directives from "./directives"
import {
    Button,
    Form,
    FormItem,
    Input,
    Container,
    Header,
    Aside,
    Main,
    Menu,
    Submenu,
    MenuItem,
    Breadcrumb,
    BreadcrumbItem,
    Card,
    Row,
    Col,
    Table,
    TableColumn,
    Switch,
    Tooltip,
    Pagination,
    Dialog,
    MessageBox,
    Tag,
    Tree,
    Select,
    Option,
    Cascader,
    Alert,
    Tabs,
    TabPane,
    Steps,
    Step,
    CheckboxGroup,
    Checkbox,
    Upload,
    Timeline,
    TimelineItem,
    Radio,
    Image,
    Descriptions,
    DescriptionsItem,
    RadioGroup,
    RadioButton,
    TimeSelect,
    DatePicker
} from 'element-ui'

Vue.use(Button);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Input);
Vue.use(Container);
Vue.use(DatePicker);
Vue.use(Header);
Vue.use(Aside);
Vue.use(Main);
Vue.use(Menu);
Vue.use(Submenu);
Vue.use(MenuItem);
Vue.use(Breadcrumb);
Vue.use(BreadcrumbItem);
Vue.use(Card);
Vue.use(Row);
Vue.use(Col);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(Switch);
Vue.use(Tooltip);
Vue.use(Pagination);
Vue.use(Dialog);
Vue.use(Tag);
Vue.use(Tree);
Vue.use(Select);
Vue.use(Option);
Vue.use(Cascader);
Vue.use(Alert);
Vue.use(Tabs);
Vue.use(TabPane);
Vue.use(Steps);
Vue.use(Step);
Vue.use(CheckboxGroup);
Vue.use(Checkbox);
Vue.use(Upload);
Vue.use(Timeline);
Vue.use(TimelineItem);
Vue.use(TimeSelect);
Vue.use(Radio);
Vue.use(Image);
Vue.use(Descriptions);
Vue.use(DescriptionsItem);
Vue.use(RadioGroup);
Vue.use(RadioButton);

Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$successMessage = successMessage
Vue.prototype.$errorMessage = errorMessage

// 字符串过滤
Vue.filter("strTailor", filter.strTailor)
// 时间过滤器
Vue.filter('dateFormat', filter.dateFormat)

Vue.directive("hasRole", directives.hasRole)
